home *** CD-ROM | disk | FTP | other *** search
/ Magnum One / Magnum One (Mid-American Digital) (Disc Manufacturing).iso / d12 / cbibcode.arc / GETMAXX.C < prev    next >
Encoding:
C/C++ Source or Header  |  1991-08-05  |  482 b   |  21 lines

  1. #include <stdio.h>
  2. #include <graphics.h>
  3.  
  4. main()
  5. {
  6.     int graphdriver = DETECT,graphmode;
  7.     int i,maxx;
  8.     char buffer[80];
  9.  
  10. /* Initialize the graphics system */
  11.     initgraph(&graphdriver,&graphmode,"c:\\turboc");
  12.     outtextxy(10,20,"Demonstrating getmaxx");
  13.  
  14. /*  Get maximum x coordinate and shit it */
  15.     maxx = getmaxx();
  16.     sprintf(buffer,"Maximum x coordinate is %d",maxx);
  17.     outtextxy(10,60,buffer);
  18. /* Give user a chance to see the result */
  19.     getch();
  20.     closegraph();
  21. }